package cn.tedu.zhyl.file.service.impl;

import cn.tedu.zhyl.base.oss.MinioUpload;
import cn.tedu.zhyl.file.service.FileUploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
@Service
public class FileUploadServiceImpl implements FileUploadService {
    @Autowired
    private MinioUpload minioUpload;
    @Override
    public String fileUpload(MultipartFile file) {
        String url = minioUpload.fileUpload(file);
        return url;
    }

    @Override
    public void deleteFile(String fileName) {
        minioUpload.deleteFile(fileName);
    }
}
